﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FantastPlatform.Framework.IModel;
using FantastPlatform.Framework.Core;
using Newtonsoft.Json;
using FantastPlatform.Framework.Common.Serializable;


namespace FantastPlatform.Framework.Model
{
    /// <summary>
    /// 组织机构
    /// </summary>
    public class Organization:Node<IOrganization>,IOrganization
    {

        #region IOrganization 成员
       [JsonConverter(typeof(InterfaceConverter<Organization>))]
        public override IOrganization Parent
        {
            get
            {
                return base.Parent;
            }
            set
            {
                base.Parent = value;
            }
        }
       [JsonProperty("OrganizationChildren")]
       [JsonConverter(typeof(InterfaceConverter<IList<Organization>>))]
       public override IList<IOrganization> Children
       {
           get
           {
               return base.Children;
           }
           set
           {
               base.Children = value;
           }
       }

        public virtual IList<IOrganizationContact> Contacts { get; set; }

         [JsonConverter(typeof(InterfaceConverter<List<Post>>))]
        public virtual IList<IPost> Posts { get; set; }

        public virtual IList<IEmployee> Employees { get; set; }

        #endregion
    }
}
